﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Autofac;
//using NCLCustomerManagement.DataTransferObjects.IocRegistration;
using NCLCustomerManagement.Common.IocRegistration;
using NCLCustomerManagement.BusinessLogic.IocRegistration;
using NCLCustomerManagement.UI.Helper;
using My.Common.Error;
using System.Web.Script.Serialization;
using My.Pattern.Builder;
using My.Common.Helper.JqGrid;

namespace NCLCustomerManagement.UI.IocRegistration
{
    public class WebModule : Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            //builder.RegisterModule(new DataTransferObjectModule());
            builder.RegisterModule(new CommonModule());
            builder.RegisterModule(new BusinessModule());

            //builder.RegisterType<My.Common.AutoMapper.AutoMapperBuilder>().As<IAutoMapperBuilder>();

            builder.RegisterType<BCFactory>().As<IBCFactory>();
            //builder.Register(x => new SessionManager(x.Resolve<IBCFactory>(), x.Resolve<IErrorBuilder>()));
            //builder.RegisterType<ExcelUtility>().As<IExcelUtility>();
            builder.RegisterType<JavaScriptSerializer>();
            //builder.RegisterType<PartialViewRender>().As<IPartialViewRender>();
           
            
            //builder.RegisterType<SaveHandler>().As<ISaveHandler>();
            //builder.RegisterType<DeleteHandler>().As<IDeleteHandler>();
            //builder.RegisterGeneric(typeof(BuildGridDataHelper<>)).As(typeof(IBuildGridDataHelper<>));
        }
    }
}
